import { PasswordModal } from './src'
import React from 'react';
import {Text, View,StyleSheet} from "react-native";

export default class PassWordDemo extends React.Component {

  state = { password: '' }

  onPress() {
    this.refs.modal.show();
  }

  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.text} onPress={() => { this.onPress() }}>点击打开支付密码modal</Text>
        <Text style={styles.text}>{this.state.password}</Text>
        <PasswordModal ref='modal' onDone={(data) => { this.setState({ password: data }) }} />
      </View>
    );
  }
}

const styles=StyleSheet.create({
  container:{
    flex:1,
  },
  text:{
    fontSize:14,
  }
})